class Solution(object):
    def digArtifacts(self, n, artifacts, dig):
        dig = {tuple(c) for c in dig}
        ans = 0
        for x1, y1, x2, y2 in artifacts:
            flag = True
            for x in range(x1, x2 + 1):
                for y in range(y1, y2 + 1):
                    if (x, y) not in dig:
                        flag = False
            ans += flag
        return ans
